package com.ihm.projetihm_v1.activity.photo.listener;

import java.io.File;

import android.R.color;
import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;

import com.ihm.projetihm_v1.activity.photo.PhotoActivity;
import com.ihm.projetihm_v1.nf.LinkedPhoto;

public class ImageControlListener implements OnClickListener {
	private PhotoActivity photoActivity;
	private File mPhoto;
	
    public ImageControlListener(Context context, File photo)
    {
    	this.photoActivity = (PhotoActivity) context;    	
    	this.mPhoto = photo;
    }
    
	@Override
	public void onClick(View arg0) {
		
		//Actualize the PhotoActivity with the image clicked
        LinkedPhoto tmpFile = this.photoActivity.findLinkedPhoto(this.mPhoto.toString());
		this.photoActivity.setFile(tmpFile);
		
	}

}
